import { App } from 'vue';
import { registerControlProvider } from '@ibiz-template/runtime';
import { CheckinPeopleTree } from './checkin-people-tree';
import { CheckinPeopleTreeProvider } from './checkin-people-tree.provider';

export default {
  install(app: App) {
    // 全局注册树视图插件组件
    app.component(CheckinPeopleTree.name!, CheckinPeopleTree);
    // 全局注册树视图插件适配器，TREE_RENDER是插件类型，checkin-people-tree是插件标识
    registerControlProvider(
      'TREE_RENDER_PEOPLE',
      () => new CheckinPeopleTreeProvider(),
    );
  },
};
